<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>前台页面</title>
<link href="./views/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="./views/bootstrap/css/bootstrap.css" rel="stylesheet" />
<script src="./views/bootstap/js/jquery-1.6.2.js"></script>
<style type="text/css">
div span {
	color: coral;
}
</style>
<script type="text/javascript">
		function checkName(){
			//获取用户名输入控件对象的内容
				var txtName = document.getElementById("textId").value;
				//信息提示框
				var sptxtName = document.getElementById("sptxtName");
				if(txtName == null || txtName == ""){
					//验证失败
					isChecked = false;
					//提示信息					
					sptxtName.innerHTML = "请输入姓名！";
					//修改标志变量
					return false;
				}else{
					sptxtName.innerHTML="";
					//修改标志变量
					return true;
				}
		}
			
		function checkMe(){
			//用户名验证
			var ischName = checkName();
		
			if(ischName ){
				//验证通过
				return true;
			}else{				
				return false;
			}
		}
		</script>
</head>
<body>
	<div style="margin-top: 100px;">
		<form class="form-horizontal" role="form" action="login6" method="post">

			<div class="form-group" style="padding-left: 200px;">
				<label for="textName" class="col-sm-2 control-label">用户名</label>
				<div class="col-sm-10" style="width: 300px;">
				        <!-- 基本类型映射表单 -->
				        <!-- <input type="text" class="form-control " id="textId"
						name="textName" placeholder="用户名" onblur="checkName();" /> -->
					    <!-- pojo类类型映射表单 -->
					    <!-- <input type="text" class="form-control " id="textId"
						name="usercode" placeholder="用户名" onblur="checkName();" /> -->
						<!-- 对象组合类型映射表单 -->
						<!-- <input type="text" class="form-control " id="textId"
						name="usercode" placeholder="用户名" onblur="checkName();" />
						<input type="text" class="form-control " id="textId"
						name="userContactWays.tellphone" placeholder="联系电话"  /> -->
						<!-- list映射表单 -->
						<!-- <input type="text" class="form-control " id="textId"
						name="usercode" placeholder="用户名" onblur="checkName();" />
						<input type="text" class="form-control " id="textId"
						name="lstUserContactWays[0].tellphone" placeholder="联系电话1"  />
						<input type="text" class="form-control " id="textId"
						name="lstUserContactWays[1].tellphone" placeholder="联系电话2"  /> -->
						<!-- map映射表单 -->
						<!-- <input type="text" class="form-control " id="textId"
						name="usercode" placeholder="用户名" onblur="checkName();" />
						<input type="text" class="form-control " id="textId"
						name="mapUserContactWays['tel1'].tellphone" placeholder="联系电话1"  />
						<input type="text" class="form-control " id="textId"
						name="mapUserContactWays['tel2'].tellphone" placeholder="联系电话2"  /> -->
						<!-- set映射表单 -->
						<!-- <input type="text" class="form-control " id="textId"
						name="usercode" placeholder="用户名" onblur="checkName();" />
						<input type="text" class="form-control " id="textId"
						name="setUserContactWays[0].tellphone" placeholder="联系电话1"  />
						<input type="text" class="form-control " id="textId"
						name="setUserContactWays[1].tellphone" placeholder="联系电话2"  /> -->
						<!-- 使用@RequestParam映射表单 -->
						<input type="text" class="form-control " id="textId"
						name="textName" placeholder="用户名" onblur="checkName();" />
					</div>
					<div>
						<span id="sptxtName"></span>
					</div>
					<div class="form-group" style="padding-left:0px;margin-top:10px">
						<label for="textName" class="col-sm-2 control-label">年龄</label>
				        <div class="col-sm-2" style="width: 300px;">
						<input type="text" class="form-control " id="textId"
						name="textAge" placeholder="年龄"  />
						</div>
					</div>
				</div>
			

			<div class="form-group" style="padding-left: 200px;margin-top:10px">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="submit" value="登录" id="btnSubmit"
						onclick="return checkMe();" />
				</div>
			</div>

		</form>
	</div>
</body>
</html>